//
//  PopBanner.swift
//  LeGou
//
//  Created by lxm on 2022/10/13.
//

import UIKit

class PopBanner: XMBaseView {

    //MARK: --------------------属性--------------------
    var imgs = [String]() {
        didSet {
            banner.imageURLStringsGroup = imgs
            banner.pageDotColor = UIColor.zm.RGBA(r: 255, g: 255, b: 255, a: 0.55)
            banner.bannerImageViewContentMode = .scaleAspectFill
            banner.autoScroll = false
//            banner.infiniteLoop = false
        }
    }
    //MARK: --------------------UI控件--------------------
     @IBOutlet weak var banner: SDCycleScrollView!
    
    //MARK: --------------------生命周期--------------------
    override init(frame: CGRect) {
        super.init(frame: frame)
        setUI()
        bindAction()
        addConstraints()
    }
    
    required init?(coder: NSCoder) {
        super.init(coder: coder)
    }
    
    override func awakeFromNib() {
        super.awakeFromNib()
        setUI()
        bindAction()
        addConstraints()
    }

    //MARK: --------------------UI--------------------
    func setUI() {
        banner.pageDotColor = UIColor.zm.RGBA(r: 255, g: 255, b: 255, a: 0.55)
        banner.bannerImageViewContentMode = .scaleAspectFill
        banner.autoScroll = false
//        banner.infiniteLoop = false
    }
    
    func addConstraints() {
     
    }
    
    //MARK: --------------------methods--------------------
    func bindAction() {
        
    }
    
    @IBAction func onClose(_ sender: Any) {
        removeFromSuperview()
    }
    
    //MARK: --------------------delegate--------------------

}
